<?php
namespace api;

class Wl 
{
	public static function getinfo($num='',$code='')
	{
		$host = "https://wdexpress.market.alicloudapi.com";
	    $path = "/gxali";
	    $method = "GET";
	    $appcode = "ab7bfa4f7d544241998ea5d8a8ddb028";
	    $headers = array();
	    array_push($headers, "Authorization:APPCODE " . $appcode);
	    $querys = "n=780098068058&t=ZTO";
	    $bodys = "";
	    $url = $host . $path . "?" . $querys;

	    $curl = curl_init();
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
	    curl_setopt($curl, CURLOPT_URL, $url);
	    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
	    curl_setopt($curl, CURLOPT_FAILONERROR, false);
	    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	    curl_setopt($curl, CURLOPT_HEADER, false);
	    if (1 == strpos("$".$host, "https://"))
	    {
	        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
	        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
	    }
	    $out_put = curl_exec($curl);
	    var_dump(json_decode($out_put,true));
	}
}

	